package cn.lizheng;

import cn.lizheng.dao.AdmininfoDAO;
import cn.lizheng.dao.AdmininfoDAOImpl;
import cn.lizheng.pojo.Admininfo;

import java.util.Scanner;

public class saveTest {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入Id:");
        int adminid = scan.nextInt();
        System.out.println(" 请输入Name：");
        String username = scan.next();
        System.out.println(" 请输入password：");
        String password = scan.next();
        System.out.println(" 请输入picurl：");
        String picurl = scan.next();
        /**
         * 插入
         */
        Admininfo a=new Admininfo(adminid,username,password,picurl);
        AdmininfoDAOImpl dao01=new AdmininfoDAOImpl() ;
        int row01=dao01.save(a);
        String msg01=row01>0?"cuc":"duf";
        System.out.println("msg = " + msg01);
    }
}
